package com.todo.member.infrastructure.repository;

import com.todo.common.common.entity.response.page.PageResult;
import com.todo.member.common.enums.MemberVipStatusEnum;
import com.todo.member.infrastructure.entity.condition.MemberVipInfoCondition;
import com.todo.member.infrastructure.entity.po.MemberVipInfoPO;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/2/10 11:53
 * @description
 */
public interface MemberVipInfoRepository {

    /**
     * 插入VIP信息
     *
     * @param memberVipInfoPO
     * @return
     */
    Boolean insertMemberVipInfoPO(MemberVipInfoPO memberVipInfoPO);

    /**
     * 更新VIP信息
     *
     * @param memberVipInfoPO
     * @return
     */
    Boolean updateMemberVipInfoPOById(MemberVipInfoPO memberVipInfoPO);

    /**
     * 删除VIP信息
     *
     * @param id
     * @return
     */
    Boolean removeMemberVipInfoPOById(Long id);


    /**
     * 根据主键查询VIP信息
     *
     * @param id
     * @return
     */
    MemberVipInfoPO queryMemberVipInfoPOById(Long id);

    /**
     * 根据name查询VIP信息
     *
     * @param name
     * @return
     */
    MemberVipInfoPO queryMemberVipInfoPOByName(String name);

    /**
     * 根据id更新VIP状态
     *
     * @param id
     * @param oldStatus
     * @param newStatus
     * @return
     */
    Boolean updateMemberVipInfoStatusById(Long id, MemberVipStatusEnum oldStatus, MemberVipStatusEnum newStatus);

    /**
     * 多条件查询VIP信息
     *
     * @param memberVipInfoCondition
     * @return
     */
    PageResult<MemberVipInfoPO> queryMemberVipInfoPOByPage(MemberVipInfoCondition memberVipInfoCondition);

    /**
     * 根据vipCode查询VIP信息
     *
     * @param vipCode
     * @return
     */
    MemberVipInfoPO queryMemberVipInfoByVipCode(String vipCode, Integer version);

    /**
     * 根据vipCode查询VIP信息list
     *
     * @param vipCode
     * @return
     */
    List<MemberVipInfoPO> queryMemberVipInfoListByVipCode(String vipCode);

    /**
     * 根据vipCode查询有效VIP信息
     *
     * @param vipType
     * @return
     */
    MemberVipInfoPO queryEffectiveMemberVipInfoByVipType(Integer vipType);

    /**
     * 根据vipCode查询VIP信息列表
     *
     * @param vipType
     * @return
     */
    List<MemberVipInfoPO> queryMemberVipInfoListByVipType(Integer vipType);

    /**
     * 查询有效的VIP信息列表
     *
     * @return
     */
    List<MemberVipInfoPO> queryEffectiveMemberVipInfoList();
}
